package net.israfil.markup.plugin;

import java.net.URL;

import net.israfil.markup.core.JAXBHelper;
import net.israfil.markup.core.MarkupApplication;
import net.israfil.markup.model.Markup;


public abstract class AbstractPlugin implements Plugin {

	protected final JAXBHelper jaxbHelper;
	
	public AbstractPlugin(JAXBHelper jaxbHelper) {
		this.jaxbHelper = jaxbHelper;
	}
	
	protected abstract String getPluginPackage();

	protected Markup getMarkup(URL definition) {
		return jaxbHelper.parse(definition, MarkupApplication.MARKUP_MODEL_PACKAGE,getPluginPackage());
	}

}
